package com.peter.design.pattern.builder.chain;

import org.apache.ibatis.mapping.CacheBuilder;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;

/**
 * @Auther: 肖冬
 * @Date: 2020/7/26 15:34
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        CourseBuilder builder = new CourseBuilder()
                .addName("设计模式")
                .addPPT("ppt课件")
                .addVideo("回放视频")
                .addNote("课堂笔记")
                .addHomework("课后作业");

        System.out.println(builder.build());

        //以下是类似写法
        StringBuilder sb = new StringBuilder();
        sb.append("a");

        CacheBuilder cacheBuilder = new CacheBuilder("");
        cacheBuilder.blocking(false);


        SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();


        //BeanDefinitionBuilder可以手动往spring容器中注入bean
        BeanDefinitionBuilder beanDefinitionBuilder = BeanDefinitionBuilder.genericBeanDefinition();

    }
}
